package routers

import (
	"Web-Shop/controllers/user"

	"github.com/astaxie/beego"
)

func userRouter() {
	c := &user.UserController{}
	beego.Router("/register", c, "GET:ShowRegister;POST:Register")
	beego.Router("/login", c, "GET:ShowLogin;POST:Login")
	beego.Router("/logout", c, "GET:Logout")
	beego.Router("/active", c, "GET:ActiveUser")
	beego.Router("/user", c, "GET:ShowUser")
	beego.Router("/orders", c, "GET:ShowOrders")
	beego.Router("/address", c, "GET:ShowAddress;POST:EditAddress")
	beego.Router("/cart", c, "GET:ShowCart")
	beego.Router("/addCart", c, "POST:AddCart")
	beego.Router("/deleteCart", c, "post:DeleteCart")
	beego.Router("/updateCart", c, "post:UpdateCart")
	beego.Router("/order", c, "POST:HandleOrder")
	beego.Router("/addOrder", c, "POST:AddOrder")
	beego.Router("/pay", c, "get:Pay")
	beego.Router("/payCallback", c, "get:PayCallback")
}
